pub fn new_birthday_probability(n: u32) -> f64 {
    if n >= 365 {
        return 0.;
    }
    // first calculate probability that no two people share the same birthday.
    let prob_no_shared = (0..n)
        .map(|i| ((365 - i) as f64) / 365.)
        .fold(1., |acc, x| acc * x);

    1. - prob_no_shared
}
